<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册</title>   
	<!-- jsonp格式是采用了向img script中的src属性不会有跨域的问题-->
	<script type="text/javascript">
		var fn = function(d)
		{
			console.log(d,666);
		}
	</script>
	<script type="text/javascript" src="http://localhost:4000/mydemo?username=123&calls=fn"></script>
</head>
<body>
    <form action="/register" method="POST" enctype="application/x-www-form-urlencoded">
     <div>用户名：<input type="text" name="user"  id="user"><span class="con"></span></div>
     <div>密码：<input type="password" name="pwd"  ></div>
     <div>密码：<input type="password" name="repwd"  ></div>
    </form>

    <script>
        // $(function(){
        //       $("#user").blur(function(){
        //       $.ajax({
        //               url:"http://localhost:4000/register",
        //               type:"post",
        //               data:{
        //                   "username":$("#user").val()
        //               },
        //               dataType:"json",
        //               success:function(data)
        //               {
        //                    $(".con").text(data.msg);
        //               },error:function(err)
        //               {
        //                   $(".con").text(err);
        //               }
        //             })
        //       })
        //  })
      
    </script>
</body>
</html>